from base_utils.paginator import ApiPagination
# 响应的格式
def get_response_dict(code, msg, data=None, **kwargs):
    # 对分页器的数据做特殊处理
    if data:
        if ApiPagination.is_page_data in data:
            data.pop(ApiPagination.is_page_data)
            ret = data
            ret.update(kwargs)
            return ret

    ret = {"code": code, "msg": msg, "data": data if data else {}}
    ret.update(kwargs)
    return ret
